﻿<Window x:Class="CPPEI.Coolzon.UI.XProperty.Editors.DataFilterEditWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:CPPEI.Coolzon.UI.XProperty.Editors"
        mc:Ignorable="d"
        Title="数据过滤" Height="300" Width="500"
        Style="{DynamicResource WindowStyle}">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="auto"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <TextBlock Grid.Column="0" Grid.Row="0" Text="文本值:" Margin="3,5,3,3" />
        <TextBox Grid.Column="1" Grid.Row="0" Name="_tbText" Margin="3,3,3,3" />
        <StackPanel Style="{DynamicResource ButtonPanelBackground}" Grid.ColumnSpan="2"  Grid.Row="1" Orientation="Horizontal">
            <Button Name="_ctlUp" Style="{DynamicResource UpButtonStyle}" FontSize="15" MinWidth="36" Margin="3" ToolTip="上移" Click="_ctlUp_Click"/>
            <Button Name="_ctlDown" Style="{DynamicResource DownButtonStyle}" FontSize="15" MinWidth="36" Margin="3" ToolTip="下移" Click="_ctlDown_Click"/>
        </StackPanel>
        <ListView Name="_listView" Grid.ColumnSpan="2" Grid.Row="2">
            <ListView.ItemTemplate>
                <DataTemplate DataType="{x:Type local:DataFilterModel}">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="auto"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <CheckBox Grid.Column="0" IsChecked="{Binding IsChecked, Mode=TwoWay}" />
                        <TextBlock Grid.Column="1" Text="{Binding Name}" />
                    </Grid>
                </DataTemplate>
            </ListView.ItemTemplate>
        </ListView>
        <Grid Grid.Row="3" Grid.ColumnSpan="2">
            <StackPanel Margin="5" Orientation="Horizontal" HorizontalAlignment="Center">
                <Button Style="{DynamicResource  SubmitOrCancelButtonStyle}" Content="确定" Margin="0,0,20,0" Click="Button_Click" Width="75" />
                <Button Style="{DynamicResource  SubmitOrCancelButtonStyle}" Name="cancel" Content="取消" Margin="20,0,0,0" Click="cancel_Click" Width="75"></Button>
            </StackPanel>
        </Grid>
    </Grid>
</Window>
